<template>
  <el-card class="box-card">
    <el-table
      :data="permissionList"
      row-key="id"
      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
      border
    >
      <el-table-column prop="children" label="名称" align="center" sortable />
      <el-table-column label="权限值" align="center" sortable />
      <el-table-column label="跳转权限值" align="center" />
      <el-table-column label="操作" align="center">
        <el-button type="primary" icon="el-icon-plus" />
        <el-button type="warning" icon="el-icon-edit" />
        <el-button type="danger" icon="el-icon-delete" />
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script>
export default {
  name: 'PermissionList',
  data() {
    return {
      permissionList: {}
    }
  },
  async mounted() {
    this.getPermissionList()
  },
  methods: {
    // 获取用户列表
    async getPermissionList() {
      const { page, limit } = this
      this.loading = true
      const { data } = await this.$API.permission.reqGetPermissionList()
      this.$message({ type: 'success', message: '获取数据成功' })
      this.loading = false
      console.log(data)
      this.permissionList = data
    }
  }
}
</script>

<style></style>
